package com.corechina.apex_osswords.domain.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.corechina.apex_osswords.domain.entity.CoreMaintenanceEngineer;
import com.corechina.apex_osswords.domain.vo.CoreMaintenanceEngineerVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 运维人员信息表 Mapper 接口
 * </p>
 *
 * @author cc
 * @since 2022-03-11
 */
@Component
public interface CoreMaintenanceEngineerMapper extends BaseMapper<CoreMaintenanceEngineer> {

    IPage<CoreMaintenanceEngineerVo> getList(Page page, @Param("name") String name, @Param("company") String company, @Param("engineerType") String engineerType, @Param("serviceId") Integer serviceId, @Param("enterpriseId") Integer enterpriseId);

    CoreMaintenanceEngineerVo getOne(@Param("id") Integer id);

    @Select("select * from core_maintenance_engineer where tel = #{tel}")
    CoreMaintenanceEngineer getByTel(@Param("tel") String tel);

}
